<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
    <head>
        <div th:replace="~{custom/common/common::header}"></div>
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">欢迎管理员：
                                <span class="x-red">admin</span>！当前时间：<span id="now"></span>
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">数据统计</div>
                        <div class="layui-card-body ">
                            <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                                <li class="layui-col-md6 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>菜单配置总数</h3>
                                        <p><cite th:text="${codeNavigationConfigTotal}">66</cite></p>
                                    </a>
                                </li>
                                <li class="layui-col-md6 layui-col-xs6">
                                    <a href="javascript:;" class="x-admin-backlog-body">
                                        <h3>列表配置总数</h3>
                                        <p><cite th:text="${codeListPageConfigTotal}"></cite></p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">开发团队</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <tbody>
                                    <tr>
                                        <th>开发者</th>
                                        <td><a href="mailto:woodwhales@163.com">woodwhales</a>&nbsp;&nbsp;|&nbsp;&nbsp;木鲸鱼</td>
                                    </tr>
                                    <tr>
                                        <th>github</th>
                                        <td><a href="https://github.com/woodwhales" target="_blank">https://github.com/woodwhales</a></td>
                                    </tr>
                                    <tr>
                                        <th>版权所有</th>
                                        <td><a href="https://woodwhales.cn/" target="_blank">woodwhales's blog</a></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <style id="welcome_style"></style>
                <div class="layui-col-md12">
                    <blockquote class="layui-elem-quote layui-quote-nm">感谢layui,jquery,本系统由x-admin提供技术支持。</blockquote>
                </div>
            </div>
        </div>
        </div>
    <script>
        function datetime() {
            //创建日期时间对象
            var datetime = new Date();

            //获取组件
            var year = datetime.getFullYear();
            var month = datetime.getMonth() + 1;
            var day = datetime.getDate();
            var hour = datetime.getHours();
            var minute = datetime.getMinutes();
            var second = datetime.getSeconds();
            var week = datetime.getDay();

            //转换星期格式
            switch (week) {
                case 0:
                    var week = '星期日';
                    break;
                case 1:
                    var week = '星期一';
                    break;
                case 2:
                    var week = '星期二';
                    break;
                case 3:
                    var week = '星期三';
                    break;
                case 4:
                    var week = '星期四';
                    break;
                case 5:
                    var week = '星期五';
                    break;
                case 6:
                    var week = '星期六';
                    break;
            }

            //小时,分钟,秒如果小于10加上前导零
            if (hour < 10) {
                var hour = 0 + "" + hour;
            }

            if (minute < 10) {
                var minute = 0 + "" + minute;
            }

            if (second < 10) {
                var second = 0 + "" + second;
            }

            //完整时间
            var now =  year + "年" + month + "月" + day + "日" + " " + hour + ":" + minute + ":" + second + " " + week;

            //更新内容
            $("#now").html(now);//这里是往p标签中添加
        }

        setInterval(datetime, 1000);
    </script>
    </body>
</html>